RA6800ML: An M6800 Relocatable Macro Assembler By Jack E. Hemenway Copyright 1978 From Back of Book ----------------- RA6800ML: An M6800 Relocatable Macro Assembler is a two pass assembler for the Motorola 6800 microprocessor. It is designed to run on a minimum system of 16K bytes of memory, a system console (such as a Teletype terminal), a system monitor (for instance, the Motorola MIKBUG read only memory program or the ICOM Floppy Disk Operating System), and some form of mass file storage (dual cassette recorders or a floppy disk). The Assembler can produce a program listing, a sorted Symbol Table listing, and relocatable object code. The object code is loaded and linked with other modules using the Linking Loader LINK68. (Refer to PAPERBYTE publication "LINK68: An M6800 Linking Loader" for details). Included in this book: a complete description of the 6800 assembly language and its components, including outlines of the instruction and address formats, pseudo instructions, and macro facilities; details on interfacing and using the Assembler; error messages generated by the Assembler; the Assembler and sample IO driver source code listings; and the PAPERBYTE bar code representation of the Assembler's relocatable object file. [Introduction] To Begin With... ------------------------------- RA6800ML, a resident Macro Assembler for the Motorola 6800 Microprocessor, is a two pass assembler designed to run on a minimum system of 16K bytes of memory, a system console such as a Teletype, a system monitor such as the Motorola MIKBUG Read Only Memory program or the ICOM Floppy Disk Operating System (FDOS), and some form of mass file storage such as dual cassette recorders or a floppy disk. A system monitor other than those mentioned above could be used by simply changing two IO jumps in the Assembler, a jump to the input-a-character routine INEEE and a jump to the output-a-character routine OUTEEE, and by supplying functionally equivalent IO routines for the user's specific system. The Assembler can produce a program listing, a sorted Symbol Table listing, and relocatable object code. The object code is loaded and linked with other assembled modules using the Linking Loader LINK6800. The companion PAPERBYTE publication "LINK68 - Linking Loader for Motorola 6800" gives details on how to use the Linking Loader. This book is divided into four major sections. In the section THE SOURCE LANGUAGE, a detailed description of the 6800 assembly language and its components is given. The instruction and address type formats are outlined in addition to details about the pseudo instructions and macro facilities. This section provides the necessary background for coding programs in the 6800's assembly language and understanding the operations of the Assembler. The section on THE ASSEMBLER describes the actual routines which make up the Assembler. Each subsection presents a logical collection of routines which provide a particular function. In addition to short descriptions of the routines, a cross reference is given showing all calling and called by routines. Additional information about pointers, flags, and temporary variables is supplied. Finally, detailed flowcharts of each routine are provided. The exact IO interface needed for using the Assembler naturally depends on the actual configuration of the user's system. In INTERFACING AND USING THE ASSEMBLER sample IO routines for a tape system and floppy disk system are examined. Tips are given on how to design IO routines (or modify those provided as examples) to fit the user's system. Finally, information on loading and executing the Assembler, as well as source and object tape formats, are provided. Section five is the appendices which contain error messages generated by the Assembler, the Assembler and same IO driver source code listings, the bar code representation of the assembler's relocatable object file, an implementation guide for bootstrapping RA6800ML without the use of the linking loader LINK68, and the Assembler and IO routines in absolute formats for the bootstrap process. Finally, a detailed INDEX is included for quick reference to a variety of items. In this book is what I believe to be a complete set of documentation for the 6800 assembler program. Every flowchart, every listing, every item was included for one purpose: to provide the user with everything needed for the use of modification of the Macro Assembler. In addition, it was my express purpose to provide everything necessary so that the user can easily learn what he or she needs to know about the system. By providing not only the 6800 assembler language description, but also a source code listing and detailed description of every routine of the Assembler, I intend to provide the user with an opportunity to learn about the nature of assembler design and implementation as well as simply acquiring a useful software tool. It is through this kind of encouragement that I hope to advance the state of the art of home computing. Table of Contents ----------------- To Begin With The Source Language Instruction Format Addressing Modes Address Type Formats Pseudo Instructions Macros Program Linkage The Assembler Assembler Modules Overview Tables Stacks Utility Routines Listings Routines Mnemonic and Symbol Table Routines Input and Output Routines Pseudo Instruction Processing Opcode Processing Routines Address Processing Lexical Analysis Routines Evaluation Routine Interfacing And Using The Assembler IO Interface Conventions Tape Driver Routines Disk Driver Routines Assembler Loading and Execution Loading the Object Code Source Tape Format Object Tape Format Appendices Appendix A: Error Messages Appendix B: Capacities Appendix C: Notes from a User: Implementation of RA6800ML Appendix D: RA6800ML Assembly Language Object Code in Absolute Hexadecimal Format Appendix E: PAPERBYTE Bar Code Representation of RA6800ML in Absolute Format Appendix F: Input and Output Routines for RA6800ML in Absolute Format With PAPERBYTE Bar Code Representation Appendix G: Assembly Language Source Listing of RA6800ML Appendix H: ASCII Text Listing of the Relocatable Format Object Code for RA6800ML Appendix I: PAPERBYTE Bar Code Representation of Relocatable Format Object Code for RA6800ML Appendix J: Cassette Tape IO Listing Appendix K: ICOM Floppy Disk IO Listing Index